//package com.elink.enginerring.controller;
//
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import io.swagger.annotations.ApiParam;
//
//import java.util.Map;
//
//import javax.validation.Valid;
//
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.ModelAttribute;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestMethod;
//import org.springframework.web.bind.annotation.RequestParam;
//import org.springframework.web.bind.annotation.RestController;
//
//import com.elink.enginerring.co.BaseCo;
//import com.elink.enginerring.service.CollectionService;
//
//@RestController
//@RequestMapping("/api/collection")
//@Api("百问百答收藏接口")
//public class CollectionController {
//	@Autowired
//	private CollectionService collectionService;
//
//	/**
//	 * 收藏
//	 * @param userId
//	 * @param postbarId
//	 * @return
//	 */
//	@RequestMapping(value="/update",method=RequestMethod.GET)
//	@ApiOperation(value="用户收藏问题")
//	public Map<String, Object> update(@ApiParam(value = "问题id", required = true) @RequestParam("postbarId") String postbarId) {
//		@SuppressWarnings("unchecked")
//		Map<String,Object> userInfo  = (Map<String, Object>) LocalUtil.get();
//		String userId =  userInfo.get("userId").toString();
//		return collectionService.updateCollect(userId, postbarId);
//	}
//	
//	/**
//	 * 我的收藏
//	 * @param count
//	 * @return
//	 */
//	@RequestMapping(value="/myCollect",method=RequestMethod.GET)
//	@ApiOperation(value="我的收藏文件")
//	public Map<String, Object> getMyCollect(@ModelAttribute @Valid BaseCo co) {
//		@SuppressWarnings("unchecked")
//		Map<String,Object> userInfo  = (Map<String, Object>) LocalUtil.get();
//		String userId =  userInfo.get("userId").toString();
//		return collectionService.getMyCollect(co,userId);
//	}
//}
